.\" SPDX-License-Identifier: BSD-2-Clause
.\" Copyright (C) 2014 - 2020 Intel Corporation.
.\"
.TH "MEMKIND_HUGETLB" 3 "2015-04-21" "Intel Corporation" "MEMKIND_HUGETLB" \" -*- nroff -*-
.SH "NAME"
memkind_hugetlb \- hugetlb memory memkind operations.
.br
.BR Note:
This is EXPERIMENTAL API. The functionality and the header file itself can be changed (including non-backward compatible changes) or removed.
.SH "SYNOPSIS"
.sp
.BI "int memkind_hugetlb_check_available_2mb(struct memkind " "*kind" );
.br
.BI "int memkind_hugetlb_get_mmap_flags(struct memkind " "*kind" ", int " "*flags" );
.br
.BI "void memkind_hugetlb_init_once(void);"
.br

.SH DESCRIPTION
.PP
The hugetlb memory memkind operations enable memory kinds which use
the Linux hugetlbfs file system.  For more information about the
hugetlbfs see link below.
.br
.UR https://www.kernel.org/doc/Documentation/vm/hugetlbpage.txt
.UE
.PP
.BR memkind_hugetlb_check_available_2mb ()
check if there are 2MB pages reserved in the default hugetlbfs.  If
the kind implements
.BR ops.get_mbind_nodemask (),
then only the NUMA nodes
set by the nodemask are checked, otherwise every NUMA node is checked.
.PP
.BR memkind_hugetlb_get_mmap_flags ()
sets the flags for the
.BR mmap ()
system call such that the hugetlbfs is utilized for allocations.
.PP
.BR memkind_hugetlb_init_once ()
this function initializes
.B MEMKIND_HUGETLB
kind and it should not be called more than once.
.BR Note:
.BR memkind_hugetlb_init_once ()
may reserve some extra memory.
.SH "COPYRIGHT"
Copyright (C) 2014 - 2020 Intel Corporation. All rights reserved.
.SH "SEE ALSO"
.BR memkind (3),
.BR memkind_arena (3),
.BR memkind_default (3),
.BR memkind_hbw (3),
.BR memkind_pmem (3),
.BR jemalloc (3),
.BR mbind (2),
.BR mmap (2)
